<script setup>
import { ref, onMounted } from "vue";
import { assetConfigDetailApi } from "@/api";
import { useRoute } from "vue-router";
const route = useRoute();
const newsDetail = ref({});

const getDetail = () => {
  assetConfigDetailApi({ asset_config_id: route.query.id }).then((res) => {
    newsDetail.value = res;
  });
};

onMounted(() => {
  getDetail();
});
</script>
<template>
  <div class="p-3 max-w-[1200px] mx-auto">
    <div class="flex flex-col gap-8 pt-5 pb-3 border-b border-[#eee]">
      <div class="text-3xl font-bold">{{ newsDetail.asset_config_title }}</div>
      <div class="flex gap-5 text-[#999]">
        <div>{{ newsDetail.update_time }}</div>
        <div>
          <i class="bi bi-eye"></i>&nbsp;
          <span> {{ newsDetail.asset_config_view_count }} </span>
        </div>
      </div>
    </div>
    <div class="mt-5" v-html="newsDetail.asset_config_content"></div>
  </div>
</template>
